import request from '@/utils/request'

// 查询在用化学品列表
export function list(query) {
  return request({
    url: '/labdander/purchase_d/list',
    method: 'get',
    params: query
  })
}
//listScandata
export function listScandata(query) {
  return request({
    url: '/labdander/purchase_d/listScandata',
    method: 'get',
    params: query
  })
}
///instance/{instanceId}
export function listByinstance(query) {
  return request({
    url: '/labdander/purchase_d/instance',
    method: 'get',
    params: query
  })
}
// 查询在用化学品台帐
export function queryInventory(query) {
  return request({
    url: '/labdander/purchase_d/inventory',
    method: 'get',
    params: query
  })
}
//updateRemoved
export function updateRemoved(data) {
  return request({
    url: '/labdander/purchase_d/updateRemoved',
    method: 'post',
    data: data
  })
}
//scanin
// 化学品入库
export function scanin(data) {
  return request({
    url: '/labdander/purchase_d/scanin',
    method: 'post',
    data: data
  })
}
// 查询化学品入库
export function getScanInfo(purchaseDetailId) {
  return request({
    url: '/labdander/purchase_d/scaninfo/' + purchaseDetailId,
    method: 'get'
  })
}
// 查询在用化学品详细
export function getCas(purchaseDetailId) {
  return request({
    url: '/labdander/purchase_d/' + purchaseDetailId,
    method: 'get'
  })
}

// 新增在用化学品
export function addCas(data) {
  return request({
    url: '/labdander/purchase_d',
    method: 'post',
    data: data
  })
}
export function updateQuantity(data) {
  return request({
    url: '/labdander/purchase_d/updateNum',
    method: 'post',
    data: data
  })
}


// 修改在用化学品
export function updateCas(data) {
  return request({
    url: '/labdander/purchase_d',
    method: 'put',
    data: data
  })
}

// 删除在用化学品
export function delCas(purchaseDetailId) {
  return request({
    url: '/labdander/purchase_d/' + purchaseDetailId,
    method: 'delete'
  })
}
